﻿<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.BusinessName</title>
    <link href="/layui/css/layui.css" rel="stylesheet" />
    <script src="/layui/layui.js"></script>
    <script src="/lib/jquery/dist/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <blockquote class="layui-elem-quote layui-text">
        您正在操作的是【@ViewBag.BusinessName】
        <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;">
            <div>
                <button onclick="Add()" class="layui-btn layui-btn-normal">新增</button>
                <button onclick="self.location=document.referrer;" class="layui-btn layui-btn-warm">返回</button>
            </div>
        </fieldset>
    </blockquote>
    <div class="layui-container">
        <div class="layui-row layui-col-space10">
            @Html.Raw(ViewBag.CardView);
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    function Add()
    {
        layui.use('layer', function () {
            var layer = layui.layer;
            layer.open({
                type: 2,
                title: false,
                shadeClose: true,
                shade: 0.8,
                area: ['800px', '600px'],
                content: '/FormManage/FormView?TableName=@ViewBag.TableName&PkName=@ViewBag.PkName&PkValue=@ViewBag.PkValue'
            });
        });
    }
    function Update(fkname, fkvalue)
    {
        layui.use('layer', function () {
            var layer = layui.layer;
            layer.open({
                type: 2,
                title: false,
                shadeClose: true,
                shade: 0.8,
                area: ['800px', '600px'],
                content: '/FormManage/FormView?TableName=@ViewBag.TableName&PkName=@ViewBag.PkName&PkValue=@ViewBag.PkValue&FkName=' + fkname + '&FkValue=' + fkvalue+''
            });
        });
    }
    function del(fkname)
    {
        layui.use('layer', function () {
            var layer = layui.layer;
            layer.confirm('数据珍贵，您确定要删除吗？', {
                btn: ['不后悔', '后悔了'] //按钮
            }, function () {
                layer.msg('删除成功', { icon: 1 });
            }, function () {
                layer.msg('取消删除', { icon: 1 });
            });
        });
    }
</script>
